#ifndef _DOUBLELIST_H
#define _DOUBLELIST_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <strings.h>
#include <sys/mman.h>
#include <linux/input.h> //跟输入子系统模型有关的头文件
#include <dirent.h> //跟目录操作有关
#include <errno.h>

struct doublelist
{	//数据域
	char name[20];
	float price;
	int num;
	char picpath[20];
	//指针域
	struct doublelist *next; 
	struct doublelist *prev;
};

extern struct doublelist *list_init();
extern int list_insert_tail(struct doublelist *head,char *newname,float newprice,int newnum,char *picpath);
extern int list_insert_mid(struct doublelist *head,int olddata,int newdata);
extern int list_del(struct doublelist *head,char *delname);
extern int list_update(struct doublelist *head,char *oldname,char *newname,float newprice,int newnum,char *newpath);
extern int list_show(struct doublelist *head);

#endif